<?php
require __DIR__.'/vendor/autoload.php';

include "config.php";
include "init_capsule.php";

use Arathi\Models\Status as StatusRepository;

$client = new Arathi\WeiboClient($config['token']);

// $statuses = $client->getPublicStatuses();
// echo '获取' . count($statuses) . '条公共微博' . "\r\n";

$statuses = $client->getHomePageStatuses();
echo '获取' . count($statuses) . '条首页微博' . "\r\n";

foreach ($statuses as $status)
{
    $statusMdl = StatusRepository::create($status->toFillableArray());
}
